//
//  OosCheckinEntry.m
//  Oos4ios
//
//  Created by Pablo Gonzalez on 2/23/11.
//  Copyright 2011 11870.com. All rights reserved.
//

#import "OosCheckinEntry.h"

@implementation OosCheckinCount

+ (NSString *) extensionElementLocalName 
{
	return @"count";
}

@end


@implementation OosCheckinEntry

- (void) addExtensionDeclarations
{
	[super addExtensionDeclarations];
	
	Class entryClass = [self class];
	
	[self addExtensionDeclarationForParentClass:entryClass childClasses:
	 //Oos Extension
	 [OosCheckinCount class], [OosAuthor class], nil];
	
}

#pragma mark <link rel="service">

- (NSString *) userUrl
{
	return [[self linkWithRelAttributeValue:@"service"] href];
}

#pragma mark <oos:count>

- (OosCheckinCount *) count
{
	return [self objectForExtensionClass: [OosCheckinCount class]];
}

- (void) setCount:(OosCheckinCount *) count
{
	[self setObject:count forExtensionClass:[OosCheckinCount class]];
}

- (OosAuthor *)oosAuthor
{
    return [self objectForExtensionClass: [OosAuthor class]];
}

- (void)setOosAuthor:(OosAuthor *)oosAuthor
{
    [self setObject: oosAuthor forExtensionClass:[OosAuthor class]];
}

@end
